package io;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class OSWDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("osw.txt");
        OutputStreamWriter osw = new OutputStreamWriter(fos, StandardCharsets.UTF_8);
        String line = "回忆是抓不住的眼光，";
        osw.write(line);
        osw.write("握紧就变黑暗。");
        System.out.println("写出完毕！");
        osw.close();
    }
}
